#pragma once
#include "atlimage.h"

// CPicButton

class CPicButton : public CButton
{
	DECLARE_DYNAMIC(CPicButton)

public:
	CPicButton();
	virtual ~CPicButton();

protected:
	DECLARE_MESSAGE_MAP()
public:
	virtual void DrawItem(LPDRAWITEMSTRUCT /*lpDrawItemStruct*/);
private:
	CImage m_image;
public:
	afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
	virtual void PreSubclassWindow();
public:
	void SetNumber(int i,int x,int y){
		m_number = i;
		m_x = x;
		m_y = y;
		CString str;
		str.Format(L"picture\\it\\%d.png",m_number);
		m_image.Load(str);
	}
private:
	int m_number;
	int m_x;
	int m_y;
public:
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
};


	